<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>API and Extensions | RubyFu</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.2">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-anchors/plugin.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-splitter/splitter.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-expandable-chapters/expandable-chapters.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    
        <link rel="stylesheet" href="../styles/website.css">
    

        
    
    
    <link rel="next" href="../module_0x5__exploitation_kung_fu/meterpreter_scripting.html" />
    
    
    <link rel="prev" href="../module_0x5__exploitation_kung_fu/meterpreter.html" />
    

        <script type="text/javascript" src="../styles/header.js"></script>
    </head>
    <body>
        
        
    <div class="book"
        data-level="5.2.3.1"
        data-chapter-title="API and Extensions"
        data-filepath="module_0x5__exploitation_kung_fu/extensions.md"
        data-basepath=".."
        data-revision="Wed Jan 27 2016 09:00:51 GMT+0300 (AST)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Module 0x0 | Introduction
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.1" data-path="contribution.html">
            
                
                    <a href="../contribution.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>0.1.</b>
                        
                        Contribution
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="0.2" data-path="beginners.html">
            
                
                    <a href="../beginners.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>0.2.</b>
                        
                        Beginners
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="0.3" data-path="required_gems.html">
            
                
                    <a href="../required_gems.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>0.3.</b>
                        
                        Required Gems
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1" data-path="module_0x1__basic_ruby_kung_fu/index.html">
            
                
                    <a href="../module_0x1__basic_ruby_kung_fu/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        Module 0x1 | Basic Ruby Kung Fu
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="module_0x1__basic_ruby_kung_fu/string.html">
            
                
                    <a href="../module_0x1__basic_ruby_kung_fu/string.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        String
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.1" data-path="module_0x1__basic_ruby_kung_fu/conversion.html">
            
                
                    <a href="../module_0x1__basic_ruby_kung_fu/conversion.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.1.</b>
                        
                        Conversion
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.2" data-path="module_0x1__basic_ruby_kung_fu/extraction.html">
            
                
                    <a href="../module_0x1__basic_ruby_kung_fu/extraction.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.2.</b>
                        
                        Extraction
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="module_0x1__basic_ruby_kung_fu/array.html">
            
                
                    <a href="../module_0x1__basic_ruby_kung_fu/array.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        Array
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="module_0x2__system_kung_fu/index.html">
            
                
                    <a href="../module_0x2__system_kung_fu/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        Module 0x2 | System Kung Fu
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="module_0x2__system_kung_fu/command_execution.html">
            
                
                    <a href="../module_0x2__system_kung_fu/command_execution.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        Command Execution
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="module_0x2__system_kung_fu/file_manipulation.html">
            
                
                    <a href="../module_0x2__system_kung_fu/file_manipulation.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        File manipulation
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.1" data-path="module_0x2__system_kung_fu/parsing_html,_xml,_json.html">
            
                
                    <a href="../module_0x2__system_kung_fu/parsing_html,_xml,_json.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.1.</b>
                        
                        Parsing HTML, XML, JSON
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="module_0x2__system_kung_fu/cryptography.html">
            
                
                    <a href="../module_0x2__system_kung_fu/cryptography.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        Cryptography
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="module_0x2__system_kung_fu/system_shell.html">
            
                
                    <a href="../module_0x2__system_kung_fu/system_shell.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        Remote Shell
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.4.1" data-path="module_0x2__system_kung_fu/ncatrb.html">
            
                
                    <a href="../module_0x2__system_kung_fu/ncatrb.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.1.</b>
                        
                        Ncat.rb
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4.2" data-path="module_0x2__system_kung_fu/rce_as_a_service.html">
            
                
                    <a href="../module_0x2__system_kung_fu/rce_as_a_service.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.2.</b>
                        
                        RCE as a Service
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="module_0x2__system_kung_fu/virustotal.html">
            
                
                    <a href="../module_0x2__system_kung_fu/virustotal.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        VirusTotal
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="module_0x3__network_kung_fu/index.html">
            
                
                    <a href="../module_0x3__network_kung_fu/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        Module 0x3 | Network Kung Fu
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="module_0x3__network_kung_fu/ruby_socket.html">
            
                
                    <a href="../module_0x3__network_kung_fu/ruby_socket.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        Ruby Socket
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="module_0x3__network_kung_fu/ssid_finder.html">
            
                
                    <a href="../module_0x3__network_kung_fu/ssid_finder.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        SSID Finder
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="module_0x3__network_kung_fu/ftp.html">
            
                
                    <a href="../module_0x3__network_kung_fu/ftp.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        FTP
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="module_0x3__network_kung_fu/ssh.html">
            
                
                    <a href="../module_0x3__network_kung_fu/ssh.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.4.</b>
                        
                        SSH
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="module_0x2__system_kung_fu/email.html">
            
                
                    <a href="../module_0x2__system_kung_fu/email.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.5.</b>
                        
                        Email
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.5.1" data-path="module_0x2__system_kung_fu/smtp_enumeration.html">
            
                
                    <a href="../module_0x2__system_kung_fu/smtp_enumeration.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.5.1.</b>
                        
                        SMTP Enumeration
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.6" data-path="module_0x3__network_kung_fu/network_scanning.html">
            
                
                    <a href="../module_0x3__network_kung_fu/network_scanning.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.6.</b>
                        
                        Network Scanning
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.6.1" data-path="module_0x3__network_kung_fu/nmap.html">
            
                
                    <a href="../module_0x3__network_kung_fu/nmap.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.6.1.</b>
                        
                        Nmap
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.7" data-path="module_0x3__network_kung_fu/dns.html">
            
                
                    <a href="../module_0x3__network_kung_fu/dns.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.7.</b>
                        
                        DNS
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.7.1" data-path="module_0x3__network_kung_fu/dns_enumeration.html">
            
                
                    <a href="../module_0x3__network_kung_fu/dns_enumeration.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.7.1.</b>
                        
                        DNS Enumeration
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.8" data-path="module_0x3__network_kung_fu/snmp_enumeration.html">
            
                
                    <a href="../module_0x3__network_kung_fu/snmp_enumeration.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.8.</b>
                        
                        SNMP Enumeration
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.9" data-path="module_0x3__network_kung_fu/tns_enumeration.html">
            
                
                    <a href="../module_0x3__network_kung_fu/tns_enumeration.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.9.</b>
                        
                        Oracle TNS Enumeration
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.10" data-path="module_0x3__network_kung_fu/packet_manipulation.html">
            
                
                    <a href="../module_0x3__network_kung_fu/packet_manipulation.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.10.</b>
                        
                        Packet manipulation
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.10.1" data-path="module_0x3__network_kung_fu/arp_spoofing.html">
            
                
                    <a href="../module_0x3__network_kung_fu/arp_spoofing.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.10.1.</b>
                        
                        ARP Spoofing
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.10.2" data-path="module_0x3__network_kung_fu/dns_spoofing.html">
            
                
                    <a href="../module_0x3__network_kung_fu/dns_spoofing.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.10.2.</b>
                        
                        DNS Spoofing
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="module_0x4__web_kung_fu/index.html">
            
                
                    <a href="../module_0x4__web_kung_fu/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        Module 0x4 | Web Kung Fu
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="module_0x4__web_kung_fu/sql_injection_scanner.html">
            
                
                    <a href="../module_0x4__web_kung_fu/sql_injection_scanner.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        SQL Injection Scanner
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="module_0x4__web_kung_fu/databases.html">
            
                
                    <a href="../module_0x4__web_kung_fu/databases.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        Databases
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="module_0x4__web_kung_fu/extending_burpsuite.html">
            
                
                    <a href="../module_0x4__web_kung_fu/extending_burpsuite.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.3.</b>
                        
                        Extending Burp Suite
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.4" data-path="module_0x4__web_kung_fu/browser_manipulation.html">
            
                
                    <a href="../module_0x4__web_kung_fu/browser_manipulation.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.4.</b>
                        
                        Browser Manipulation
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.5" data-path="module_0x4__web_kung_fu/web_servcies_and_apis.html">
            
                
                    <a href="../module_0x4__web_kung_fu/web_servcies_and_apis.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.5.</b>
                        
                        Web Services and APIs
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.5.1" data-path="module_0x4__web_kung_fu/web_services.html">
            
                
                    <a href="../module_0x4__web_kung_fu/web_services.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.5.1.</b>
                        
                        Interacting with Web Services
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.5.2" data-path="module_0x4__web_kung_fu/interacting_with_apis.html">
            
                
                    <a href="../module_0x4__web_kung_fu/interacting_with_apis.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.5.2.</b>
                        
                        Interacting with APIs
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.5.2.1" data-path="module_0x4__web_kung_fu/wordpress_api.html">
            
                
                    <a href="../module_0x4__web_kung_fu/wordpress_api.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.5.2.1.</b>
                        
                        WordPress API
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.5.2.2" data-path="module_0x4__web_kung_fu/twitter_api.html">
            
                
                    <a href="../module_0x4__web_kung_fu/twitter_api.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.5.2.2.</b>
                        
                        Twitter API
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4.6" data-path="module_0x4__web_kung_fu/ruby2javascript.html">
            
                
                    <a href="../module_0x4__web_kung_fu/ruby2javascript.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.6.</b>
                        
                        Ruby 2 JavaScript
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.7" data-path="module_0x4__web_kung_fu/web_server_and_proxy.html">
            
                
                    <a href="../module_0x4__web_kung_fu/web_server_and_proxy.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.7.</b>
                        
                        Web Server and Proxy
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5" data-path="module_0x5__exploitation_kung_fu/index.html">
            
                
                    <a href="../module_0x5__exploitation_kung_fu/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        Module 0x5 | Exploitation Kung Fu
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1" data-path="module_0x5__exploitation_kung_fu/fuzzer.html">
            
                
                    <a href="../module_0x5__exploitation_kung_fu/fuzzer.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.1.</b>
                        
                        Fuzzer
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="module_0x5__exploitation_kung_fu/metasploit.html">
            
                
                    <a href="../module_0x5__exploitation_kung_fu/metasploit.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.</b>
                        
                        Metasploit
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.2.1" data-path="module_0x5__exploitation_kung_fu/auxiliary_module.html">
            
                
                    <a href="../module_0x5__exploitation_kung_fu/auxiliary_module.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.1.</b>
                        
                        Auxiliary module
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2.2" data-path="module_0x5__exploitation_kung_fu/exploit_module.html">
            
                
                    <a href="../module_0x5__exploitation_kung_fu/exploit_module.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.2.</b>
                        
                        Exploit module
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2.3" data-path="module_0x5__exploitation_kung_fu/meterpreter.html">
            
                
                    <a href="../module_0x5__exploitation_kung_fu/meterpreter.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.3.</b>
                        
                        Meterpreter
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="5.2.3.1" data-path="module_0x5__exploitation_kung_fu/extensions.html">
            
                
                    <a href="../module_0x5__exploitation_kung_fu/extensions.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.3.1.</b>
                        
                        API and Extensions
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2.3.2" data-path="module_0x5__exploitation_kung_fu/meterpreter_scripting.html">
            
                
                    <a href="../module_0x5__exploitation_kung_fu/meterpreter_scripting.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.3.2.</b>
                        
                        Meterpreter Scripting
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2.3.3" data-path="module_0x5__exploitation_kung_fu/railgun_api_extension.html">
            
                
                    <a href="../module_0x5__exploitation_kung_fu/railgun_api_extension.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.3.3.</b>
                        
                        Railgun API Extension
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5.3" data-path="module_0x5__exploitation_kung_fu/metasm.html">
            
                
                    <a href="../module_0x5__exploitation_kung_fu/metasm.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.3.</b>
                        
                        metasm
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6" data-path="module_0x6__forensic/index.html">
            
                
                    <a href="../module_0x6__forensic/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.</b>
                        
                        Module 0x6 | Forensic Kung Fu
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.1" data-path="module_0x6__forensic/windows_forensic.html">
            
                
                    <a href="../module_0x6__forensic/windows_forensic.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.1.</b>
                        
                        Windows Forensic
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.2" data-path="module_0x6__forensic/android_forensic.html">
            
                
                    <a href="../module_0x6__forensic/android_forensic.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.2.</b>
                        
                        Android Forensic
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.3" data-path="module_0x3__network_kung_fu/network_traffic_analysis.html">
            
                
                    <a href="../module_0x3__network_kung_fu/network_traffic_analysis.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.3.</b>
                        
                        Network Traffic Analysis
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.4" data-path="module_0x6__forensic/parsing_log_files.html">
            
                
                    <a href="../module_0x6__forensic/parsing_log_files.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.4.</b>
                        
                        Parsing Log Files
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="7" data-path="references/index.html">
            
                
                    <a href="../references/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.</b>
                        
                        References
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8" data-path="faqs/index.html">
            
                
                    <a href="../faqs/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.</b>
                        
                        FAQs
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="9" data-path="contributors/index.html">
            
                
                    <a href="../contributors/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.</b>
                        
                        Contributors
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="9.1" data-path="contributors/todo.html">
            
                
                    <a href="../contributors/todo.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.1.</b>
                        
                        TODO
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../" >RubyFu</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="meterpreter-api-and-extensions"><a name="meterpreter-api-and-extensions" class="plugin-anchor" href="#meterpreter-api-and-extensions"><span class="fa fa-link"></span></a>Meterpreter API and Extensions</h1>
<p>Meterpreter extensions are located in <code>metasploit-framework/lib/rex/post/meterpreter</code>. It&apos;s highly recommended to browse and open the files to understand the code and it&apos;s style.</p>
<h2 id="extension-clientcore--core"><a name="extension-clientcore--core" class="plugin-anchor" href="#extension-clientcore--core"><span class="fa fa-link"></span></a>Extension ClientCore : <code>core</code></h2>
<p><strong>Path</strong> </p>
<ul>
<li><code>metasploit-framework/lib/rex/post/meterpreter/client_core.rb</code></li>
</ul>
<pre><code class="lang-ruby"><span class="hljs-prompt">&gt;&gt;</span> client.core
<span class="hljs-status">=&gt;</span> <span class="hljs-value">#&lt;Rex::Post::Meterpreter::ClientCore:0x00000005f83388 @client=#&lt;Session:meterpreter 192.168.0.18:55861 (192.168.242.128) &quot;win7-64-victim\Workshop @ WIN7-64-VICTIM&quot;&gt;</span>, <span class="hljs-variable">@name</span>=<span class="hljs-string">&quot;core&quot;</span>&gt;
</code></pre>
<p><strong>use</strong> method is used to load meterpreter extensions which is used in the meterpreter console (ex. <code>use sniffer</code>, <code>use mimikatz</code>, etc )</p>
<blockquote>
<p>Note: to list all loadable extensions in meterpreter console use <code>use -l</code> command.</p>
</blockquote>
<p>From IRB console of the meterpreter, let&apos;s try to use <em>sniffer</em> extension</p>
<pre><code class="lang-ruby"><span class="hljs-prompt">&gt;&gt;</span> client.sniffer
<span class="hljs-status">=&gt;</span> nil
</code></pre>
<p>As you can see, it returns a <code>nil</code> because the <em>sniffer</em> extension hasn&apos;t yet loaded.</p>
<p>Let&apos;s try to load the extension </p>
<pre><code class="lang-ruby"><span class="hljs-prompt">&gt;&gt;</span> client.use <span class="hljs-string">&quot;sniffer&quot;</span>
<span class="hljs-status">=&gt;</span> nil
</code></pre>
<p>As you can see it returns a <code>nil</code> because the method <em>use</em> is available in the <code>core</code> extension not in the meterpreter <code>client</code> instance.</p>
<ul>
<li>To load extension: <code>load sniffer</code></li>
</ul>
<pre><code class="lang-ruby"><span class="hljs-prompt">&gt;&gt;</span> client.core.use <span class="hljs-string">&quot;sniffer&quot;</span>
<span class="hljs-status">=&gt;</span> true
<span class="hljs-prompt">&gt;&gt;</span> client.sniffer
<span class="hljs-status">=&gt;</span> <span class="hljs-value">#&lt;Rex::Post::Meterpreter::Extensions::Sniffer::Sniffer:0x000000142cc108 @client=#&lt;Session:meterpreter 192.168.0.18:55861 (192.168.242.128) &quot;win7-64-victim\Workshop @ WIN7-64-VICTIM&quot;&gt;</span>, <span class="hljs-variable">@name</span>=<span class="hljs-string">&quot;sniffer&quot;</span>&gt;
</code></pre>
<p>To check all <em>sniffer</em> extension methods, go to <code>metasploit-framework/lib/rex/post/meterpreter/extensions/sniffer/sniffer.rb</code></p>
<p>also, from IRB, get all methods as we know </p>
<pre><code class="lang-ruby">client.sniffer.methods
</code></pre>
<p>which returns an array of all available methods</p>
<pre><code class="lang-ruby"><span class="hljs-prompt">&gt;&gt;</span> client.sniffer.methods
<span class="hljs-status">=&gt;</span> [<span class="hljs-symbol">:interfaces</span>, <span class="hljs-symbol">:capture_start</span>, <span class="hljs-symbol">:capture_stop</span>, <span class="hljs-symbol">:capture_stats</span>, <span class="hljs-symbol">:capture_release</span>, <span class="hljs-symbol">:capture_dump</span>, <span class="hljs-symbol">:capture_dump_read</span>, <span class="hljs-symbol">:name</span>, <span class="hljs-symbol">:name=</span>, <span class="hljs-symbol">:client</span>, <span class="hljs-symbol">:client=</span>, <span class="hljs-symbol">:psych_to_yaml</span>, <span class="hljs-symbol">:to_yaml</span>, <span class="hljs-symbol">:to_yaml_properties</span>, <span class="hljs-symbol">:blank?</span>, <span class="hljs-symbol">:present?</span>, <span class="hljs-symbol">:presence</span>, <span class="hljs-symbol">:acts_like?</span>, <span class="hljs-symbol">:to_param</span>, <span class="hljs-symbol">:to_query</span>, <span class="hljs-symbol">:try</span>, <span class="hljs-symbol">:try!</span>, <span class="hljs-symbol">:duplicable?</span>, <span class="hljs-symbol">:deep_dup</span>, <span class="hljs-symbol">:in?</span>, <span class="hljs-symbol">:instance_values</span>, <span class="hljs-symbol">:instance_variable_names</span>, <span class="hljs-symbol">:to_json</span>, <span class="hljs-symbol">:with_options</span>, <span class="hljs-symbol">:html_safe?</span>, <span class="hljs-symbol">:<span class="hljs-string">`, :dclone, :old_send, :as_json, :require_or_load, :require_dependency, :load_dependency, :load, :require, :unloadable, :assert_no_remainder, :decode_tlv, :decode_integer, :decode_timeticks, :decode_integer_value, :decode_uinteger_value, :build_integer, :decode_octet_string, :decode_ip_address, :decode_sequence, :decode_object_id, :decode_object_id_value, :encode_length, :encode_integer, :encode_tagged_integer, :integer_to_octets, :encode_null, :encode_exception, :encode_tlv, :encode_octet_string, :encode_sequence, :encode_object_id, :pretty_print, :pretty_print_cycle, :pretty_print_instance_variables, :pretty_print_inspect, :nil?, :===, :=~, :!~, :eql?, :hash, :&lt;=&gt;, :class, :singleton_class, :clone, :dup, :taint, :tainted?, :untaint, :untrust, :untrusted?, :trust, :freeze, :frozen?, :to_s, :inspect, :methods, :singleton_methods, :protected_methods, :private_methods, :public_methods, :instance_variables, :instance_variable_get, :instance_variable_set, :instance_variable_defined?, :remove_instance_variable, :instance_of?, :kind_of?, :is_a?, :tap, :send, :public_send, :respond_to?, :extend, :select, :display, :sleep, :method, :public_method, :singleton_method, :define_singleton_method, :object_id, :to_enum, :enum_for, :gem, :class_eval, :pretty_inspect, :silence_warnings, :enable_warnings, :with_warnings, :silence_stderr, :silence_stream, :suppress, :capture, :silence, :quietly, :debugger, :breakpoint, :suppress_warnings, :==, :equal?, :!, :!=, :instance_eval, :instance_exec, :__send__, :__id__]
</span></span></code></pre>
<ul>
<li>Getting available interfaces: <code>sniffer_interfaces</code> </li>
</ul>
<p>which returns array of hashes </p>
<pre><code class="lang-ruby">client.sniffer.interfaces
<span class="hljs-status">=&gt;</span> [{<span class="hljs-string">&quot;idx&quot;</span>=&gt;<span class="hljs-number">1</span>, <span class="hljs-string">&quot;name&quot;</span>=&gt;<span class="hljs-string">&quot;\\Device\\NdisWanBh&quot;</span>, <span class="hljs-string">&quot;description&quot;</span>=&gt;<span class="hljs-string">&quot;WAN Miniport (Network Monitor)&quot;</span>, <span class="hljs-string">&quot;type&quot;</span>=&gt;<span class="hljs-number">3</span>, <span class="hljs-string">&quot;mtu&quot;</span>=&gt;<span class="hljs-number">1514</span>, <span class="hljs-string">&quot;wireless&quot;</span>=&gt;false, <span class="hljs-string">&quot;usable&quot;</span>=&gt;true, <span class="hljs-string">&quot;dhcp&quot;</span>=&gt;false}, 
{<span class="hljs-string">&quot;idx&quot;</span>=&gt;<span class="hljs-number">2</span>, <span class="hljs-string">&quot;name&quot;</span>=&gt;<span class="hljs-string">&quot;\\Device\\{DF8BF690-33F1-497F-89ED-A31C236FE8E3}&quot;</span>, <span class="hljs-string">&quot;description&quot;</span>=&gt;<span class="hljs-string">&quot;Intel(R) PRO/1000 MT Network Connection&quot;</span>, <span class="hljs-string">&quot;type&quot;</span>=&gt;<span class="hljs-number">0</span>, <span class="hljs-string">&quot;mtu&quot;</span>=&gt;<span class="hljs-number">1514</span>, <span class="hljs-string">&quot;wireless&quot;</span>=&gt;false, <span class="hljs-string">&quot;usable&quot;</span>=&gt;true, <span class="hljs-string">&quot;dhcp&quot;</span>=&gt;true}]
</code></pre>
<h2 id="extension-stdapifs--fs"><a name="extension-stdapifs--fs" class="plugin-anchor" href="#extension-stdapifs--fs"><span class="fa fa-link"></span></a>Extension Stdapi::Fs : <code>fs</code></h2>
<p><strong>Path</strong> </p>
<ul>
<li><code>metasploit-framework/lib/rex/post/meterpreter/extensions/stdapi/stdapi.rb</code></li>
<li><code>metasploit-framework/lib/rex/post/meterpreter/extensions/stdapi/fs</code></li>
</ul>
<pre><code class="lang-ruby"><span class="hljs-prompt">&gt;&gt;</span> client.fs
<span class="hljs-status">=&gt;</span> <span class="hljs-value">#&lt;Rex::Post::Meterpreter::ObjectAliases:0x00000001db6ae0 @aliases={&quot;dir&quot;=&gt;</span><span class="hljs-value">#&lt;Class:0x00000001e09e70&gt;</span>, <span class="hljs-string">&quot;file&quot;</span>=&gt;<span class="hljs-value">#&lt;Class:0x00000001e12890&gt;</span>, <span class="hljs-string">&quot;filestat&quot;</span>=&gt;<span class="hljs-value">#&lt;Class:0x00000001db7530&gt;</span>, <span class="hljs-string">&quot;mount&quot;</span>=&gt;<span class="hljs-value">#&lt;Rex::Post::Meterpreter::Extensions::Stdapi::Fs::Mount:0x00000001db6c48 @client=#&lt;Session:meterpreter 192.168.0.18:57016 (192.168.242.128) &quot;win7-64-victim\Workshop @ WIN7-64-VICTIM&quot;&gt;</span>&gt;}&gt;
</code></pre>
<h3 id="dir-class-dirrb"><a name="dir-class-dirrb" class="plugin-anchor" href="#dir-class-dirrb"><span class="fa fa-link"></span></a>Dir class: <code>dir.rb</code></h3>
<p>One of the extensions available for <code>fs</code> is <strong>Dir</strong> located in <code>metasploit-framework/lib/rex/post/meterpreter/extensions/stdapi/fs/dir.rb</code>. Let&apos;s to use some of its methods which we can know from <code>client.fs.dir.methods</code> or from source code.</p>
<ul>
<li><p>Get current directory: <code>pwd</code></p>
<pre><code class="lang-ruby"><span class="hljs-prompt">&gt;&gt;</span> client.fs.dir.pwd
<span class="hljs-status">=&gt;</span> <span class="hljs-string">&quot;C:\\Windows\\System32&quot;</span>
</code></pre>
</li>
<li><p>List all files and directories in the current directory <code>ls</code></p>
<pre><code class="lang-ruby">client.fs.dir.entries
client.fs.dir.entries_with_info
</code></pre>
</li>
<li><p>Change the current directory: <code>cd</code></p>
<pre><code class="lang-ruby"><span class="hljs-prompt">&gt;&gt;</span> client.fs.dir.chdir(<span class="hljs-string">&quot;c:\\&quot;</span>)
<span class="hljs-status">=&gt;</span> <span class="hljs-number">0</span>
<span class="hljs-prompt">&gt;&gt;</span> client.fs.dir.pwd
<span class="hljs-status">=&gt;</span> <span class="hljs-string">&quot;c:\\&quot;</span>
</code></pre>
</li>
<li><p>Create a new directory: <code>mkdir</code></p>
<pre><code class="lang-ruby"><span class="hljs-prompt">&gt;&gt;</span> client.fs.dir.mkdir(<span class="hljs-string">&quot;Rubyfu&quot;</span>)
<span class="hljs-status">=&gt;</span> <span class="hljs-number">0</span>
<span class="hljs-prompt">&gt;&gt;</span> client.fs.dir.chdir(<span class="hljs-string">&quot;Rubyfu&quot;</span>)
<span class="hljs-status">=&gt;</span> <span class="hljs-number">0</span>
<span class="hljs-prompt">&gt;&gt;</span> client.fs.dir.pwd
<span class="hljs-status">=&gt;</span> <span class="hljs-string">&quot;c:\\Rubyfu&quot;</span>
</code></pre>
</li>
</ul>
<h3 id="file-class-filerb"><a name="file-class-filerb" class="plugin-anchor" href="#file-class-filerb"><span class="fa fa-link"></span></a>File class: <code>file.rb</code></h3>
<p>Discover <strong>File</strong> class, let&apos;s begin with a simple search. Try to download and download files.</p>
<ul>
<li>Search <pre><code class="lang-ruby">client.fs.file.search(<span class="hljs-string">&quot;C:\\Users&quot;</span>, <span class="hljs-string">&quot;*.exe&quot;</span>)
</code></pre>
</li>
</ul>
<h2 id="extension-stdapifs--sys"><a name="extension-stdapifs--sys" class="plugin-anchor" href="#extension-stdapifs--sys"><span class="fa fa-link"></span></a>Extension Stdapi::Fs : <code>sys</code></h2>
<p><strong>Path</strong> </p>
<ul>
<li><code>metasploit-framework/lib/rex/post/meterpreter/extensions/stdapi/stdapi.rb</code></li>
<li><code>metasploit-framework/lib/rex/post/meterpreter/extensions/stdapi/sys</code></li>
</ul>
<pre><code class="lang-ruby"><span class="hljs-prompt">&gt;&gt;</span> client.sys
<span class="hljs-status">=&gt;</span> <span class="hljs-value">#&lt;Rex::Post::Meterpreter::ObjectAliases:0x00000001dcd600 @aliases={&quot;config&quot;=&gt;</span><span class="hljs-value">#&lt;Rex::Post::Meterpreter::Extensions::Stdapi::Sys::Config:0x00000001db69c8 @client=#&lt;Session:meterpreter 192.168.0.18:57016 (192.168.242.128) &quot;win7-64-victim\Workshop @ WIN7-64-VICTIM&quot;&gt;</span>&gt;, <span class="hljs-string">&quot;process&quot;</span>=&gt;<span class="hljs-value">#&lt;Class:0x00000001db69a0&gt;</span>, <span class="hljs-string">&quot;registry&quot;</span>=&gt;<span class="hljs-value">#&lt;Class:0x00000001db8ed0&gt;</span>, <span class="hljs-string">&quot;eventlog&quot;</span>=&gt;<span class="hljs-value">#&lt;Class:0x00000001dc0e28&gt;</span>, <span class="hljs-string">&quot;power&quot;</span>=&gt;<span class="hljs-value">#&lt;Class:0x00000001dc4398&gt;</span>}&gt;
</code></pre>
<h3 id="config-class-configrb"><a name="config-class-configrb" class="plugin-anchor" href="#config-class-configrb"><span class="fa fa-link"></span></a>Config class: <code>config.rb</code></h3>
<ul>
<li><p>Get User ID: <code>getuid</code></p>
<pre><code class="lang-ruby"><span class="hljs-prompt">&gt;&gt;</span> client.sys.config.getuid
<span class="hljs-status">=&gt;</span> <span class="hljs-string">&quot;NT AUTHORITY\\SYSTEM&quot;</span>
</code></pre>
</li>
<li><p>Get system information</p>
<pre><code class="lang-ruby"><span class="hljs-prompt">&gt;&gt;</span> client.sys.config.sysinfo
<span class="hljs-status">=&gt;</span> {<span class="hljs-string">&quot;Computer&quot;</span>=&gt;<span class="hljs-string">&quot;WIN7-64-VICTIM&quot;</span>, <span class="hljs-string">&quot;OS&quot;</span>=&gt;<span class="hljs-string">&quot;Windows 7 (Build 7600).&quot;</span>, <span class="hljs-string">&quot;Architecture&quot;</span>=&gt;<span class="hljs-string">&quot;x64 (Current Process is WOW64)&quot;</span>, <span class="hljs-string">&quot;System Language&quot;</span>=&gt;<span class="hljs-string">&quot;en_US&quot;</span>, <span class="hljs-string">&quot;Domain&quot;</span>=&gt;<span class="hljs-string">&quot;WORKGROUP&quot;</span>, <span class="hljs-string">&quot;Logged On Users&quot;</span>=&gt;<span class="hljs-number">2</span>}
</code></pre>
</li>
<li><p>Check if current process is running as SYSTEM user</p>
<pre><code class="lang-ruby"><span class="hljs-prompt">&gt;&gt;</span> client.sys.config.is_system?
=&gt; true
</code></pre>
</li>
<li><p>Enables all possible privileges: <code>getpriv</code></p>
<pre><code class="lang-ruby"><span class="hljs-prompt">&gt;&gt;</span> client.sys.config.getprivs
<span class="hljs-status">=&gt;</span> [<span class="hljs-string">&quot;SeDebugPrivilege&quot;</span>, <span class="hljs-string">&quot;SeIncreaseQuotaPrivilege&quot;</span>, <span class="hljs-string">&quot;SeSecurityPrivilege&quot;</span>, <span class="hljs-string">&quot;SeTakeOwnershipPrivilege&quot;</span>, <span class="hljs-string">&quot;SeLoadDriverPrivilege&quot;</span>, <span class="hljs-string">&quot;SeSystemProfilePrivilege&quot;</span>, <span class="hljs-string">&quot;SeSystemtimePrivilege&quot;</span>, <span class="hljs-string">&quot;SeProfileSingleProcessPrivilege&quot;</span>, <span class="hljs-string">&quot;SeIncreaseBasePriorityPrivilege&quot;</span>, <span class="hljs-string">&quot;SeCreatePagefilePrivilege&quot;</span>, <span class="hljs-string">&quot;SeBackupPrivilege&quot;</span>, <span class="hljs-string">&quot;SeRestorePrivilege&quot;</span>, <span class="hljs-string">&quot;SeShutdownPrivilege&quot;</span>, <span class="hljs-string">&quot;SeSystemEnvironmentPrivilege&quot;</span>, <span class="hljs-string">&quot;SeChangeNotifyPrivilege&quot;</span>, <span class="hljs-string">&quot;SeRemoteShutdownPrivilege&quot;</span>, <span class="hljs-string">&quot;SeUndockPrivilege&quot;</span>, <span class="hljs-string">&quot;SeManageVolumePrivilege&quot;</span>]
</code></pre>
</li>
</ul>
<h3 id="process-class-processrb"><a name="process-class-processrb" class="plugin-anchor" href="#process-class-processrb"><span class="fa fa-link"></span></a>Process class: <code>process.rb</code></h3>
<ul>
<li><p>Get the current Process ID: <code>getpid</code></p>
<pre><code class="lang-ruby"><span class="hljs-prompt">&gt;&gt;</span> client.sys.process.getpid
<span class="hljs-status">=&gt;</span> <span class="hljs-number">2392</span>
</code></pre>
</li>
<li><p>Get all exist processes with its details (pid, ppid, name, path, session, user, arch): <code>ps</code></p>
<pre><code class="lang-ruby">client.sys.process.get_processes
<span class="hljs-comment"># Or</span>
client.sys.process.processes
</code></pre>
</li>
</ul>
<h2 id="extension-stdapifs--net"><a name="extension-stdapifs--net" class="plugin-anchor" href="#extension-stdapifs--net"><span class="fa fa-link"></span></a>Extension Stdapi::Fs : <code>net</code></h2>
<p><strong>Path</strong> </p>
<ul>
<li><code>metasploit-framework/lib/rex/post/meterpreter/extensions/stdapi/stdapi.rb</code></li>
<li><code>metasploit-framework/lib/rex/post/meterpreter/extensions/stdapi/net</code></li>
</ul>
<pre><code class="lang-ruby"><span class="hljs-prompt">&gt;&gt;</span> client.net
<span class="hljs-status">=&gt;</span> <span class="hljs-value">#&lt;Rex::Post::Meterpreter::ObjectAliases:0x00000001dcd3d0 @aliases={&quot;config&quot;=&gt;</span><span class="hljs-value">#&lt;Rex::Post::Meterpreter::Extensions::Stdapi::Net::Config:0x00000001dcd4e8 @client=#&lt;Session:meterpreter 192.168.0.18:57016 (192.168.242.128) &quot;win7-64-victim\Workshop @ WIN7-64-VICTIM&quot;&gt;</span>&gt;, <span class="hljs-string">&quot;socket&quot;</span>=&gt;<span class="hljs-value">#&lt;Rex::Post::Meterpreter::Extensions::Stdapi::Net::Socket:0x00000001dcd4c0 @client=#&lt;Session:meterpreter 192.168.0.18:57016 (192.168.242.128) &quot;win7-64-victim\Workshop @ WIN7-64-VICTIM&quot;&gt;</span>&gt;, <span class="hljs-string">&quot;resolve&quot;</span>=&gt;<span class="hljs-value">#&lt;Rex::Post::Meterpreter::Extensions::Stdapi::Net::Resolve:0x00000001dcd470 @client=#&lt;Session:meterpreter 192.168.0.18:57016 (192.168.242.128) &quot;win7-64-victim\Workshop @ WIN7-64-VICTIM&quot;&gt;</span>&gt;}&gt;
</code></pre>
<ul>
<li><p>Get the current victim interfaces: <code>ifconfig</code> or <code>ipconfig</code></p>
<pre><code class="lang-ruby">client.net.config.get_interfaces
<span class="hljs-comment"># Or </span>
client.net.config.interfaces
<span class="hljs-comment"># Try nicer outputs</span>
<span class="hljs-prompt">&gt;&gt;</span> puts client.net.config.interfaces[<span class="hljs-number">0</span>].pretty
<span class="hljs-constant">Interface</span> <span class="hljs-number">11</span>
============
<span class="hljs-constant">Name</span>         <span class="hljs-symbol">:</span> <span class="hljs-constant">Intel</span>(<span class="hljs-constant">R</span>) <span class="hljs-constant">PRO</span>/<span class="hljs-number">1000</span> <span class="hljs-constant">MT</span> <span class="hljs-constant">Network</span> <span class="hljs-constant">Connection</span>
<span class="hljs-constant">Hardware</span> <span class="hljs-constant">MAC</span> <span class="hljs-symbol">:</span> <span class="hljs-number">00</span><span class="hljs-symbol">:</span>0<span class="hljs-symbol">c:</span><span class="hljs-number">29</span><span class="hljs-symbol">:ff</span><span class="hljs-symbol">:fa</span><span class="hljs-symbol">:</span><span class="hljs-number">10</span>
<span class="hljs-constant">MTU</span>          <span class="hljs-symbol">:</span> <span class="hljs-number">1500</span>
<span class="hljs-constant">IPv4</span> <span class="hljs-constant">Address</span> <span class="hljs-symbol">:</span> <span class="hljs-number">192.168</span>.<span class="hljs-number">242.128</span>
<span class="hljs-constant">IPv4</span> <span class="hljs-constant">Netmask</span> <span class="hljs-symbol">:</span> <span class="hljs-number">255.255</span>.<span class="hljs-number">255.0</span>
<span class="hljs-constant">IPv6</span> <span class="hljs-constant">Address</span> <span class="hljs-symbol">:</span> <span class="hljs-symbol">fe80:</span><span class="hljs-symbol">:</span><span class="hljs-number">482</span><span class="hljs-symbol">c:</span><span class="hljs-number">27</span><span class="hljs-symbol">b5:</span><span class="hljs-number">6914</span><span class="hljs-symbol">:e813</span>
<span class="hljs-constant">IPv6</span> <span class="hljs-constant">Netmask</span> <span class="hljs-symbol">:</span> <span class="hljs-symbol">ffff:</span><span class="hljs-symbol">ffff:</span><span class="hljs-symbol">ffff:</span><span class="hljs-symbol">ffff:</span><span class="hljs-symbol">:</span>
</code></pre>
</li>
<li><p>Get network stat: <code>netstat</code></p>
<pre><code class="lang-ruby">client.net.config.netstat
</code></pre>
</li>
<li><p>Get the ARP table: <code>arp</code></p>
<pre><code class="lang-ruby">client.net.config.arp_table
client.net.config.arp_table[<span class="hljs-number">0</span>].ip_addr      <span class="hljs-comment"># IP address </span>
client.net.config.arp_table[<span class="hljs-number">0</span>].mac_addr     <span class="hljs-comment"># MAC address </span>
client.net.config.arp_table[<span class="hljs-number">0</span>].interface    <span class="hljs-comment"># Interface</span>
</code></pre>
</li>
<li><p>Routes: <code>route</code></p>
<pre><code class="lang-ruby">client.net.config.routes        <span class="hljs-comment"># List routes </span>
client.net.config.add_route(<span class="hljs-string">&quot;192.168.2.0&quot;</span>, <span class="hljs-number">24</span>, <span class="hljs-string">&quot;192.168.2.1&quot;</span>)   <span class="hljs-comment"># Add route</span>
</code></pre>
</li>
<li><p>Get Proxy settings: <code>getproxy</code></p>
<pre><code class="lang-ruby">client.net.config.get_proxy_config
</code></pre>
</li>
</ul>
<p>As you can see how easy to get familiar with meterpreter API. there are other extensions you can play with </p>
<pre><code>meterpreter &gt; use -l
espia
extapi
incognito
kiwi
lanattacks
mimikatz
priv
python
sniffer
stdapi
</code></pre><p>You can add more about those too in Rubyfu!</p>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../module_0x5__exploitation_kung_fu/meterpreter.html" class="navigation navigation-prev " aria-label="Previous page: Meterpreter"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../module_0x5__exploitation_kung_fu/meterpreter_scripting.html" class="navigation navigation-next " aria-label="Next page: Meterpreter Scripting"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../gitbook/app.js"></script>

    
    <script src="../gitbook/plugins/gitbook-plugin-splitter/splitter.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-book-summary-scroll-position-saver/book-summary-scroll-position-saver.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"addcssjs":{"js":["styles/header.js"]},"anchors":{},"todo":{},"splitter":{},"book-summary-scroll-position-saver":{},"expandable-chapters":{},"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
